<?php

use Illuminate\Database\Migrations\Migration;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Support\Facades\Schema;

class AlterOrderRecordWithholdAddTranTypeRefund extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::table('mybank_order_record_withhold_mappings', function (Blueprint $table) {
            $table->unsignedTinyInteger("tranType")->default(1)->comment("0 无，1：付款 2：退款")->after('amount');
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::table('mybank_order_record_withhold_mappings', function (Blueprint $table) {
            $table->dropColumn("tranType");
        });
    }
}
